home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #1 / Amiga Plus CD - 2000 - No. 1.iso / Tools / HD / SmartFileSystem / V1.58 / Sources / fs / fs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-01-24  |  1.8 KB  |  56 lines

  1. #ifndef FS_H
  2. #define FS_H
  3.  
  4. #include <exec/types.h>
  5. #include <libraries/iffparse.h>
  6.  
  7. // #define CHECKCODE
  8. #define CHECKCODE_BNODES
  9.  
  10. // #define CHECKCHECKSUMSALWAYS
  11.  
  12. #define DEBUGCODE
  13. // #define DEBUGKPRINTF  /* If defined and DEBUGCODE is defined then uses kprintf as output */
  14. // #define DEBUG115200
  15.  
  16. // #define WORDCOMPRESSION
  17. #define LONGCOMPRESSION
  18. // #define NOCOMPRESSION
  19. // #define ALTERNATIVECOMPRESSION
  20. // #define BLOCKCOMPRESSION
  21.  
  22. #define PROGRAMNAME     "Smart Filesystem"
  23. #define PROGRAMNAMEVER  "SmartFilesystem"
  24.  
  25. #define MAX_NAME_LENGTH   (100)
  26.  
  27. #define INTERR_CHECKSUM_FAILURE       80
  28. #define INTERR_BLOCK_WRONG_TYPE       81
  29. #define INTERR_OWNBLOCK_WRONG         82
  30. #define INTERR_BTREE                  83
  31. #define INTERR_SAFE_DELETE            84
  32. #define INTERR_NODES                  85
  33. #define INTERR_EXTENT                 86
  34. #define INTERR_DEFRAGMENTER           87
  35.  
  36. /* macros */
  37.  
  38. #define TOBADDR(x)      (((ULONG)(x)) >> 2)
  39.  
  40. #define remove(n)    (n)->ln_Succ->ln_Pred=(n)->ln_Pred; (n)->ln_Pred->ln_Succ=(n)->ln_Succ
  41. #define addtail(l,n) (n)->ln_Succ=(l)->lh_TailPred->ln_Succ; (l)->lh_TailPred->ln_Succ=(n); (n)->ln_Pred=(l)->lh_TailPred; (l)->lh_TailPred=(n)
  42.  
  43. #define removem(n)    (n)->mln_Succ->mln_Pred=(n)->mln_Pred; (n)->mln_Pred->mln_Succ=(n)->mln_Succ
  44. #define addtailm(l,n) (n)->mln_Succ=(l)->mlh_TailPred->mln_Succ; (l)->mlh_TailPred->mln_Succ=(n); (n)->mln_Pred=(l)->mlh_TailPred; (l)->mlh_TailPred=(n)
  45. #define addheadm(l,n) (n)->mln_Succ=(l)->mlh_Head; (n)->mln_Pred=(struct MinNode *)(l); (l)->mlh_Head->mln_Pred=(n); (l)->mlh_Head=(n);
  46.  
  47. #define DOSTYPE_ID      MAKE_ID('S','F','S',0)
  48.  
  49. /* HASHENTRY(x) is used to determine which hashchain to use for
  50.    a specific hash value. */
  51.  
  52. #define HASHCHAIN(x) (UWORD)(x % (UWORD)((bytes_block-sizeof(struct fsHashTable))>>2))
  53.  
  54. #endif
  55.  
  56.